amd iommu: Introduce a new lock for event and ppr logging
authorWei Wang <wei.wang2@amd.com>
Thu, 1 Mar 2012 16:35:54 +0000 (16:35 +0000)
committerWei Wang <wei.wang2@amd.com>
Thu, 1 Mar 2012 16:35:54 +0000 (16:35 +0000)
commit39eb9768411ef1ff0905297c1cc95fde8d0ee49c
tree4b476a8ff84f3a9f4b93074af6f67046dcea844e
parentdb730e2b4fc3b650f05e99e556893e0d8cb771f1
amd iommu: Introduce a new lock for event and ppr logging

iommu->lock is used with irq disabled, so it cannot be used to protect
ppr log.  Otherwise, after c/s 24770, get_gfn will trigger a BUG() if
called by parse_ppr_log_entry(). This patch adds an additional lock to
protect ppr and event pointers in iommu_read_log().

signed-off-by: Wei Wang <wei.wang2@amd.com>
Committed-by: Keir Fraser <keir@xen.org>
xen/drivers/passthrough/amd/iommu_init.c
xen/include/asm-x86/amd-iommu.h